{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=2960
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	ans,n:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(ans,n);
if ((ans=1) and (n=1)) or ((ans<>1) and (n<>1)) then write('YES') else write('NO');
end.